package com.gitee.wsl.time.chinese

import kotlin.test.Test
import kotlin.test.assertEquals


/**
 * 物候测试
 *
 * @author 6tail
 */
class WuHouTest {
    @Test
    fun test1() {
        val solar = Solar(2020, 4, 23)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "萍始生", lunar.wuHou)
    }

    @Test
    fun test2() {
        val solar = Solar(2021, 1, 15)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "雉始雊", lunar.wuHou)
    }

    @Test
    fun test3() {
        val solar = Solar(2017, 1, 5)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "雁北乡", lunar.wuHou)
    }

    @Test
    fun test4() {
        val solar = Solar(2020, 4, 10)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "田鼠化为鴽", lunar.wuHou)
    }

    @Test
    fun test5() {
        val solar = Solar(2020, 6, 11)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "鵙始鸣", lunar.wuHou)
    }

    @Test
    fun test6() {
        val solar = Solar(2020, 6, 1)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "麦秋至", lunar.wuHou)
    }

    @Test
    fun test7() {
        val solar = Solar(2020, 12, 8)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "鹖鴠不鸣", lunar.wuHou)
    }

    @Test
    fun test8() {
        val solar = Solar(2020, 12, 11)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "鹖鴠不鸣", lunar.wuHou)
    }

    @Test
    fun test9() {
        val solar = Solar(1982, 12, 22)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "蚯蚓结", lunar.wuHou)
    }

    @Test
    fun test10() {
        val solar = Solar(2021, 12, 21)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "冬至 初候", lunar.hou)
    }

    @Test
    fun test11() {
        val solar = Solar(2021, 12, 26)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "冬至 二候", lunar.hou)
    }

    @Test
    fun test12() {
        val solar = Solar(2021, 12, 31)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "冬至 三候", lunar.hou)
    }

    @Test
    fun test13() {
        val solar = Solar(2022, 1, 5)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "小寒 初候", lunar.hou)
    }

    @Test
    fun test15() {
        val solar = Solar(2022, 8, 22)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "寒蝉鸣", lunar.wuHou)
    }

    @Test
    fun test16() {
        val solar = Solar(2022, 8, 23)
        val lunar = solar.lunar
        assertEquals(solar.toString(), "鹰乃祭鸟", lunar.wuHou)
    }
}
